//
//  AppDelegate+FirstHandle.m
//  TestDemo
//
//  Created by zhangwenqiao on 2018/12/5.
//  Copyright © 2018年 zhangwenqiao. All rights reserved.
//

#import "AppDelegate+FirstHandle.h"




@implementation AppDelegate (FirstHandle) 



- (void)rootViewControllerSet {
    // 测试的时候改变info 里的版本号就可以了
    self.window =[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    NSArray *images = @[@"1.JPG", @"2.JPG", @"3.JPG", @"4.JPG", @"5.JPG"];
    [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"currentversion"];
    BOOL first = [IntroductionViewController isShow];
    if (first) {
        IntroductionViewController *introduction = [[IntroductionViewController alloc] init];
        self.window.rootViewController = introduction;
        introduction.delegate = self;
        [introduction guidePageControllerWithImages:images];
        [self.window makeKeyAndVisible];
    }else{
        [self clickEnter];
    }
}

- (void)clickEnter {
    RootTabBarViewController *tabBar = [[RootTabBarViewController alloc] init];
    self.window.rootViewController = tabBar;
    [self.window.layer transitionWithAnimType:0 subType:TransitionSubtypesFromLeft curve:TransitionCurveRamdom duration:0.6f];
}
@end
